package com.qfedu.provider.controller;

import com.qfedu.params.ProductionLike;
import com.qfedu.provider.service.DbLikeService;
import com.qfedu.utils.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Administrator
 * @date 2024/11/23 下午12:26
 */
@RestController
@RequestMapping("/server/like")
@Tag(name = "点赞管理")
@RequiredArgsConstructor
public class LikeController {
    private final DbLikeService dbLikeService;

    @Operation(summary = "视频点赞与取消点赞")
    @PostMapping("/VideoLike")
    public R videoLike(@RequestBody ProductionLike productionLike){
        return dbLikeService.VideoLike(productionLike);
    }

    @Operation(summary = "动态点赞与取消点赞")
    @PostMapping("/DynamicLike")
    public R dynamicLike(@RequestBody ProductionLike productionLike){
        return dbLikeService.DynamicLike(productionLike);
    }

}
